//
//  TransitionAnimationTVCell.m
//  Home
//
//  Created by 曹连华 on 2019/7/2.
//  Copyright © 2019 曹连华. All rights reserved.
//

#import "TransitionAnimationTVCell.h"
#import "TransitionAnimationTVCellModel.h"
#import <Masonry/Masonry.h>
@interface TransitionAnimationTVCell ()
@property (nonatomic, strong) UILabel *titleLabel;
@end

@implementation TransitionAnimationTVCell

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textColor = hex(0X666666);
        _titleLabel.font = [UIFont systemFontOfSize:13];
        _titleLabel.backgroundColor = [UIColor groupTableViewBackgroundColor];
        _titleLabel.numberOfLines = 0;
        
    }
    return _titleLabel;
}
- (void)initUI {
    [self.contentView addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(10);
        make.top.mas_equalTo(5);
        make.bottom.mas_equalTo(-5);
        make.trailing.mas_equalTo(-10);
    }];
    
}

- (void)updateTVCCellWithRowModel:(TransitionAnimationTVCellModel *)rowModel atIndexPath:(NSIndexPath *)indexPath {
    self.titleLabel.text = [NSString stringWithFormat:@"%ld-%@\n%@",(long)indexPath.row,rowModel.mainTitle,rowModel.subTitle];
}
@end
